import request from '../utils/bsinRequest';

// 添加编排机
export const choreographyAdd = (paramsOne: any) => {
  return request('/send', {
    serviceName: 'RegistryStateMachineService',
    methodName: 'registryStateMachine',
    bizParams: {
      ...paramsOne,
    },
  });
};

// 根据服务名选方法
export const methodNameByServiceName = (paramsOne: any) => {
  return request('/send', {
    serviceName: 'AtomicServiceService',
    methodName: 'getMethodNameByServiceName',
    bizParams: {
      ...paramsOne,
    },
  });
};

// 修改编排机
export const editChoreographyJSON = (paramsOne: any) => {
  return request('/send', {
    serviceName: 'ChoreographyServiceService',
    methodName: 'editStateMachineJsonById',
    bizParams: {
      ...paramsOne,
    },
  });
};

// 根据id选服务
export const serviceNameByAppId = (paramsOne: any) => {
  return request('/send', {
    serviceName: 'AtomicServiceService',
    methodName: 'getServiceNameByAppId',
    bizParams: {
      ...paramsOne,
    },
  });
};

// 根据方法选版本
export const versionByMethodName = (paramsOne: any) => {
  return request('/send', {
    serviceName: 'AtomicServiceService',
    methodName: 'getMethodNameByServiceName',
    bizParams: {
      ...paramsOne,
    },
  });
};
